package ni;

/*
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
*/

/** 
 * This class used tp be used when we were doing the file transfer negociation in TCP
 * This class IS NOT USED ANYMORE but we did not have the heart to delete it
 * @author gb
 */
public class TCPServer extends Thread {

    /*
    private ServerSocket sock;
    private ChatNI chatNI;

    public TCPServer(ChatNI chatNI) {
        super();
        this.chatNI = chatNI;
    }

    public void run() {
        try {
            ChatNI.printDebug("TCPServer", "run", "Creating socket");
            this.sock = new ServerSocket(ChatNI.receivePort);

            while (true) {
                ChatNI.printDebug("TCPServer", "run", "Waiting for connection");
                Socket sockfd = sock.accept();
                TCPReceiver tcprcvr = new TCPReceiver(sockfd, this.chatNI);

                tcprcvr.start();
            }
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            System.err.println("Could not create the server socket");
        }

    }
    */
}
